package com.xue.user.config;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
 * @author zhuangxl
 * @description
 * @since 2021-07-22 16:15
 */
@Configuration
@RefreshScope
@Data
@Slf4j
public class ConfigRefresh {

    @Value("${config.info}")
    private String info;

    @PostConstruct
    public void init(){
        log.info("获取配置中心信息：{}", this.info);
    }
}
